package com.github.cyf.mapper;

import com.github.cyf.domain.po.Device;
import com.github.cyf.interceptor.encrypt.EncryptResult;
import com.github.cyf.interceptor.encrypt.impl.AESEncryptStrategy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author chenyifan
 * @create 2024-04-15 15:26
 */
@Mapper
public interface DeviceMapper {

    @EncryptResult(encryptStrategy = AESEncryptStrategy.class, fields = {"tenantName"})
    @Select("SELECT * FROM t_device")
    List<Device> getAllDevice();

    @Select("SELECT device_name FROM t_device")
    List<String> getAllDeviceName();
}
